package com.urea.system.service.impl;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.urea.system.mapper.TerminalLogMapper;
import com.urea.system.domain.TerminalLog;
import com.urea.system.service.ITerminalLogService;

/**
 * 终端日志Service业务层处理
 * 
 * @author liuzd
 * @date 2023-08-01
 */
@Service
public class TerminalLogServiceImpl extends ServiceImpl<TerminalLogMapper, TerminalLog> implements ITerminalLogService
{
    @Autowired
    private TerminalLogMapper terminalLogMapper;

    /**
     * 查询终端日志
     * 
     * @param id 终端日志主键
     * @return 终端日志
     */
    @Override
    public TerminalLog selectTerminalLogById(Long id)
    {
        return terminalLogMapper.selectTerminalLogById(id);
    }

    /**
     * 查询终端日志列表
     * 
     * @param terminalLog 终端日志
     * @return 终端日志
     */
    @Override
    public List<TerminalLog> selectTerminalLogList(TerminalLog terminalLog)
    {
        return terminalLogMapper.selectTerminalLogList(terminalLog);
    }

    /**
     * 新增终端日志
     * 
     * @param terminalLog 终端日志
     * @return 结果
     */
    @Override
    public int insertTerminalLog(TerminalLog terminalLog)
    {
        return terminalLogMapper.insertTerminalLog(terminalLog);
    }

    /**
     * 修改终端日志
     * 
     * @param terminalLog 终端日志
     * @return 结果
     */
    @Override
    public int updateTerminalLog(TerminalLog terminalLog)
    {
        return terminalLogMapper.updateTerminalLog(terminalLog);
    }

    /**
     * 批量删除终端日志
     * 
     * @param ids 需要删除的终端日志主键
     * @return 结果
     */
    @Override
    public int deleteTerminalLogByIds(Long[] ids)
    {
        return terminalLogMapper.deleteTerminalLogByIds(ids);
    }

    /**
     * 删除终端日志信息
     * 
     * @param id 终端日志主键
     * @return 结果
     */
    @Override
    public int deleteTerminalLogById(Long id)
    {
        return terminalLogMapper.deleteTerminalLogById(id);
    }

    /**
     * 获取本月设备的加注数以及当天的
     *
     * @return 结果
     */
    @Override
    public List<Map<String, Object>> queryFillByDate() {
        return terminalLogMapper.queryFillByDate();
    }
}
